package xtu.www.module.main;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import xtu.www.common.router.Router;
import xtu.www.common.router.rule.ActivityRule;

/**
 * Created by huilin on 2017/6/15.
 */

public class MainActivity extends AppCompatActivity {
    Button btJumpA;
    Button btJumpB;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        setTheme(R.style.AppTheme);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btJumpA = (Button) findViewById(R.id.bt_jump_a);
        btJumpB = (Button) findViewById(R.id.bt_jump_b);
        btJumpA.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent invoke = Router.invoke(MainActivity.this, ActivityRule.ACTIVITY_SCHEME + "module_a");
                startActivity(invoke);
            }
        });
        btJumpB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent invoke = Router.invoke(MainActivity.this, ActivityRule.ACTIVITY_SCHEME + "module_b");
                startActivity(invoke);

            }
        });
    }
}
